Skip to content

Conversation

@rjleveque
Copy link
Member

As originally written, the deformation dtopo.dZ was computed for each subfault and stored, and then summed up over all subfaults. In a CSZ problem with 8000 subfaults and fine resolution dtopo grids, this ran out of memory. The refactored version computes and uses each subfault dtopo in a way that it can be discarded before computing the next subfault deformation.

Also added a slip_tol parameter so that the deformation is not computed for any subfaults with smaller slip than this tolerance (which could be a large fraction of the subfaults in some situations, e.g. a small localized earthquake on a large subduction zone fault surface).

Also the verbose parameter can now be an integer, in which case it prints the subfault number k during processing only if numpy.mod(k,verbose) == 0.

I tested this with the dtopotools_examples notebook and both the static and kinematic version seem to work fine, though a small change in maximum dZ of 2e-4 that violates an assertion in the notebook. But that already failed on master, so I'll look into that separately.

As originally written, the deformation dtopo.dZ was computed for each
subfault and stored, and then summed up over all subfaults. In a CSZ problem
with 8000 subfaults and fine resolution dtopo grids, this ran out of memory.
The refactored version computes and uses each subfault dtopo in a way that
it can be discarded before computing the next subfault deformation.

Also added a `slip_tol` parameter so that the deformation is not computed
for any subfaults with smaller slip than this tolerance (which could be a
large fraction of the subfaults in some situations, e.g. a small localized
earthquake on a large subduction zone fault surface).

Also the `verbose` parameter can now be an integer, in which case it prints
the subfault number `k` during processing only if `numpy.mod(k,verbose) == 0`.
@mandli
Copy link
Member

mandli commented Aug 21, 2025

Besides the test you mentioned that fails, the tests pass in #642.

@rjleveque rjleveque merged commit 29c82e6 into clawpack:master Aug 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants